﻿using MMS.Api.Helper;
using MMS.Model.FormatModel;
using System.Collections.Generic;
using System.Linq;
using System.Web.WebPages;
namespace MMS.Api.Areas.Admin.Controllers
{
    public class ReturnVisitController : BaseController
    {
        #region 1.0 分页查询  //http://localhost:16824/api/ReturnVisit/GetWherePaged
        /// <summary>
        /// 
        /// </summary>
        /// <param name="id">page页码</param>
        /// <param name="id1">rows页容量</param>
        /// <returns></returns>
        public PageData<Model.ReturnVisit> GetWherePaged(string id, string id1)
        {
            int pageIndex = id.AsInt();
            int pageSize = id1.AsInt();
            //1.查询数据集合
            var pageData = OpeCur.BLLSession.ReturnVisit.WherePaged(pageIndex, pageSize, o => o.RVIsDel == false, o => o.RVId, true, "MemberInfo");
            pageData.rows = pageData.rows.Select(o => o.ToPOCO(true)).ToList();
            //2.转成json格式字符串

            return pageData;
        }
        #endregion

     
    }
}
